﻿using UnityEngine;
using System.Collections;

[System.Serializable]
public class CEffectList
{
	//타겟을 터치했을때 나오는 이펙트
	public Sprite m_TouchSprite;
    //라이프가 사라질때 나오는 이펙트
    public Sprite m_LifeDestroy;
}

public class CEffectMgr
{
    public enum E_TYPE { TOUCH = 0, LIFEDESTROY }
    public void Touch(E_TYPE eType, Vector3 vPosition)
	{
        switch (eType)
        {
            case E_TYPE.TOUCH:
                {
                    Vector3 vEffectPosition = new Vector3(vPosition.x, vPosition.y, Camera.main.transform.position.z + 10);
                    m_EffectList.m_TouchSprite.transform.position = vEffectPosition;
                    m_EffectList.m_TouchSprite.StartSprite();
                }
                break;
            case E_TYPE.LIFEDESTROY:
                {
                    Vector3 vEffectPosition = new Vector3(vPosition.x, vPosition.y, Camera.main.transform.position.z + 10);
                    m_EffectList.m_LifeDestroy.transform.position = vEffectPosition;
                    m_EffectList.m_LifeDestroy.StartSprite();
                }
                break;
        }
		
	} 

	//이펙트 리스트 
	private CEffectList m_EffectList;

	public CEffectList EffectList
	{
		get { return m_EffectList; }
		set { m_EffectList = value; }
	}
}
